package ae.pcfc.cldos.online.web.controller.client.company.nocandletters;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 
 * @author arosa
 *
 */
public final class NocAndLettersConstants {

	private NocAndLettersConstants(){}
	
	enum NocTypes{
		CONSULTANT_REPORT("CR"),
		LIQUOR_LICENSE_REPORT("LLR"),
		BANK_ACCOUNT("BA"),
		LOST_REPORT("LR"),
		NEW_DRIVING_LICENSE("NDL"),
		RENEW_DRIVING_LICENSE("RCR"),
		SALARY_CERT_REPORT("SCR"),
		TRADE_LIC_REPORT("TLR"),
		TRANSFER_CAR_REG_REPORT("TCR"),
		WORK_CERT_REPORT("WCR");
		
		private NocTypes(String code){
			this.code = code;
		}
		
		private String code;
		
		public String getCode() {
			return code;
		}
	}
	
	enum NocFormFields {
		
		TO("to"),
		LOCATION("location"),
		COUNTRIES("country"),
		PERIOD("period"),
		LOST_TEXT("lostText"),
		PLATE_NO("plateNo"),
		CAR_OWNER("carOwner"),
		CAR_TYPE("carType"),
		CAR_COLOR("carColor"),
		CAR_MODEL("carModel"),
		MACHINE_NO("machineNo"),
		SHASY_NO("shasyNo");
		
		
		private NocFormFields(String name){
			this.name = name;
		}
		
		private String name;
		
		public String getName() {
			return name;
			
			
		}
	}
	
	public static final Map<String, List<String>> NOC_FIELDS_MAPPING = new HashMap<String, List<String>>(){
		/**
		 * 
		 */
		private static final long serialVersionUID = -3530899024734970579L;

		{
			put(NocTypes.CONSULTANT_REPORT.getCode(), Arrays.asList(new String[]{
					NocFormFields.COUNTRIES.getName(),
					NocFormFields.PERIOD.getName()
			}));
			put(NocTypes.LOST_REPORT.getCode(), Arrays.asList(new String[]{
					NocFormFields.LOST_TEXT.getName()
			}));
			put(NocTypes.TRANSFER_CAR_REG_REPORT.getCode(), Arrays.asList(new String[]{
					NocFormFields.PLATE_NO.getName(),
					NocFormFields.CAR_OWNER.getName(),
					NocFormFields.CAR_TYPE.getName(),
					NocFormFields.CAR_COLOR.getName(),
					NocFormFields.MACHINE_NO.getName(),
					NocFormFields.SHASY_NO.getName(),
					NocFormFields.CAR_MODEL.getName()
			}));
		}
	};
	
	public static final Map<String, List<String>> LANG_NOC_MAPPING = new HashMap<String, List<String>>(){
		/**
		 * 
		 */
		private static final long serialVersionUID = -3654432559781394216L;

		{
			put("English", Arrays.asList(new String[]{
					NocTypes.CONSULTANT_REPORT.getCode(),
					NocTypes.LIQUOR_LICENSE_REPORT.getCode()
			}));
			put("Arabic", Arrays.asList(new String[]{
					NocTypes.CONSULTANT_REPORT.getCode(),
					NocTypes.BANK_ACCOUNT.getCode(),
					NocTypes.LOST_REPORT.getCode(),
					NocTypes.NEW_DRIVING_LICENSE.getCode(),
					NocTypes.RENEW_DRIVING_LICENSE.getCode(),
					NocTypes.SALARY_CERT_REPORT.getCode(),
					NocTypes.TRADE_LIC_REPORT.getCode(),
					NocTypes.TRANSFER_CAR_REG_REPORT.getCode(),
					NocTypes.WORK_CERT_REPORT.getCode()
			}));
		}
	};
	
}
